//
//  UIView+DON.h
//  DynamicOfNative
//
//  Created by Emo, on 2023/3/7.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, DONShadowDirection) {
    /// 上
    DONShadowDirectionTop = 0,
    /// 下
    DONShadowDirectionBottom,
    /// 左
    DONShadowDirectionLeft,
    /// 右
    DONShandowDirectionRight,
    /// 四周
    DONShadowDirectionAround,
};

NS_ASSUME_NONNULL_BEGIN

@interface UIView (DON)

/**  起点x坐标  */
@property (nonatomic, assign) CGFloat x;
/**  起点y坐标  */
@property (nonatomic, assign) CGFloat y;
/**  中心点x坐标  */
@property (nonatomic, assign) CGFloat centerX;
/**  中心点y坐标  */
@property (nonatomic, assign) CGFloat centerY;
/**  宽度  */
@property (nonatomic, assign) CGFloat width;
/**  高度  */
@property (nonatomic, assign) CGFloat height;
/**  顶部  */
@property (nonatomic, assign) CGFloat top;
/**  底部  */
@property (nonatomic, assign) CGFloat bottom;
/**  左边  */
@property (nonatomic, assign) CGFloat left;
/**  右边  */
@property (nonatomic, assign) CGFloat right;
/**  size  */
@property (nonatomic, assign) CGSize size;
/**  origin */
@property (nonatomic, assign) CGPoint origin;


/**
 * 深色毛玻璃
 */
- (void)don_BlurDark;

/**
 * 浅色毛玻璃
 */
- (void)don_BlurLight;

/**
 切圆角
 */
- (void)don_clipeCornerRadio:(CGFloat)radio
                      corner:(UIRectCorner)corner;

/**
 * 添加阴影
 * @color 阴影颜色
 * @opacity 透明度
 * @radius 半径
 * @width 阴影宽度
 */
- (void)don_shadowWithDirection:(DONShadowDirection)direction color:(UIColor *)color opacity:(CGFloat)opacity radius:(CGFloat)radius width:(CGFloat)width;

@end

NS_ASSUME_NONNULL_END
